<?php
/**
 * 控制台
 * PHP version 5
 * @package   Antonia
 * @author    Antonia <471699715@qq.com>
 * @copyright 2016 Antonia.
 */
namespace Admin\Controller;
use Think;
class ConsoleController extends AdmincommonController
{	
	/**
     * 显示控制台详细
     * @param HttpRequest $request
     * @return html
     * @author Antonia
     */
    public function index () {
        $this->display();
    }
    /**
     * 显示控制台详细
     * @param HttpRequest $request
     * @return html
     * @author Antonia
     */
    public function console () {
    	$filters = array();
    	$order_model= D("Orders");
    	$order_count = $order_model->count();
    	$filters["createTime"] = array("GT",strtotime(date("y-m-d")));
    	$new_order_count = $order_model->where($filters)->count();
        $filters = array();
        $user_model = D("Users");
        $user_count = $user_model->count();
        $filters["regTime"] = array("GT",strtotime(date("y-m-d")));
        $new_user_count = $user_model->where($filters)->count();
        $this->assign("user_count",$user_count);
        $this->assign("new_user_count",$new_user_count);        
    	$this->assign("order_count",$order_count);
    	$this->assign("new_order_count",$new_order_count);
        $this->display();
    }
}